package com.earl.user.controller;

import com.earl.common.entity.vo.Result;
import com.earl.redis.RedisUtil;
import com.earl.user.entity.po.LazadaUser;
import com.earl.user.service.LazadaUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "lazadaUser")
@RestController
@RequestMapping(value = "/user")
@Slf4j
public class LazadaUserController {

    @Autowired
    private LazadaUserService service;

    @ApiOperation(notes = "获取用户信息", value = "")
    @GetMapping("/get")
    public Result<List<LazadaUser>> amazonTransfer(RedisUtil redisUtil) {
        List<LazadaUser> list = service.list();
        redisUtil.set("111", "123");
        return Result.success(list);
    }
}
